﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Report_Change_Detail.aspx.cs"
    Inherits="EcSalseManage.EcSalse.Report_Change_Detail" %>
<%@ Register Src="../PageCommon/Report_Tab.ascx" TagName="Report_Tab" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>项目销售管理系统-转单位、买家变更</title>
    
     <script language="javascript" type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>

    <script language="javascript" type="text/javascript" src="../js/jquery-1.6.2.min.js"></script>

    <link href="../css/skin.css" type="text/css" rel="stylesheet">
    
    <style>
        .u12_line
        {
            position: absolute;
            left: 0px;
            top: 4px;
            width: 424px;
            height: 3px;
        }
        #content td
        {
            height: 20px;
        }
    </style>

    <script type="text/javascript">

        function checkUpload() {
            if (document.all.ddlFileType.value == "") {
                alert("请选择附件类型！");
                return false;
            }
            if (document.getElementById("txtFilePath").value == "") {
                alert("项目附件不能为空！");
                return false;
            }
        }


        function checkFujian() {
            var ar = document.getElementsByTagName("a");
            for (var i = 0; i < ar.length; i++) {
                var temp = ar[i].href;
                if (temp.indexOf("gzs-ecc02", 0) > 0) {
                    return false;
                }
            }
            return true;
        }
        
        function DataCheck() {

            if (checkFujian() == true) {
                if (document.all.ddlFileType.value == "") {
                    alert("请选择附件类型！");
                    return false;
                }
                if (document.getElementById("txtFilePath").value == "") {
                    alert("项目附件不能为空！");
                    return false;
                }
            }

        }
    
        function AddUser() {
            document.getElementById("detail").style.display = "block";
        }


        function addRow() {
            var FilePath = document.getElementById("txtFilePath");
            if (FilePath.value == "") {
                alert("请选择上传文件");
                return false;
            }

            var objMyTable = document.getElementById("tempTable");
            objMyTable.style.display = "block";
            var index = objMyTable.rows.length;
            var nextRow = objMyTable.insertRow(index);
            nextRow.setAttribute("style", "background-color:rgb(248, 244, 228)");

            var newCellCartonNo1 = nextRow.insertCell();
            var obj = document.getElementById("ddlFileType");
            var n = obj.selectedIndex;
            newCellCartonNo1.innerHTML = obj.options[n].text;

            document.getElementById("HiddenField1").value += "" + obj.options[n].value + "," + document.getElementById("txtFilePath").value + "," + document.getElementById("txtProjectDesc").value + "|";

            var newCellCartonNo4 = nextRow.insertCell();
            newCellCartonNo4.innerHTML = "<input style='border-width: 0px; border-style: dotted;'  onclick='deleteRow(" + index + ")'   src='..../images/delete.gif' type='image'>";
        }

        function deleteRow(obj) {

            var temp = document.getElementById("HiddenField1").value;

            temp = temp.substring(0, temp.length - 1);

            var arrayObj = temp.split("|");
            arrayObj.splice(obj - 1, 1);
            temp = "";
            for (i = 0; i < arrayObj.length; i++) {
                temp += arrayObj[i] + "|";
            }
            document.getElementById("HiddenField1").value = temp;

            document.getElementById("tempTable").deleteRow(obj);
        }
    </script>

</head>
<body>
 <form id="form1" runat="server">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td width="17" valign="top" background="../images/mail_leftbg.gif">
                <img src="../images/left-top-right.gif" width="17" height="29" />
            </td>
            <td valign="top" background="../images/content-bg.gif">
              <uc1:Report_Tab ID="Report_Tab1" runat="server" Visible="False"/>
            </td>
            <td width="16" valign="top" background="../images/mail_rightbg.gif">
                <img src="../images/nav-right-bg.gif" width="16" height="29" />
            </td>
        </tr>
        <tr>
            <td valign="middle" background="../images/mail_leftbg.gif">
                &nbsp;
            </td>
            <td valign="top" bgcolor="#F7F8F9">
                <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td colspan="4" valign="top">
                            <!-- 内容区域 -->

                            <center>
                                <table width="700px">
                                    <tr>
                                        <td align="left">
                                            <p>
                                            项目名称：<asp:Label ID="lblProjectName" runat="server" Text=""></asp:Label>
                                            </p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left">
                                         
                                                <center>
                                                    <span style="font-family: Arial; font-size: 28px; font-weight: normal; font-style: normal;  text-decoration: none; color: #333333;">
                                                        <asp:Label ID="lblTitle" runat="server" Text=""></asp:Label></span><br />
                                                    <hr style="width: 80%" />
                                                    <br />
                                                </center>
                                     
                                            <p>
                                                楼盘：<asp:TextBox ID="txtReport_Change_Building" class="edline" runat="server"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1"  Display="None" ControlToValidate="txtReport_Change_Building" runat="server" ErrorMessage="楼盘名不能为空"></asp:RequiredFieldValidator>
                                            </p>
                                            <p>
                                                由于<asp:TextBox ID="txtReport_Change_Reason" class="edline" Style="width: 200px;"
                                                    runat="server"></asp:TextBox>
                                                原因，我部于 <asp:TextBox ID="txtReport_Change_ReviseDate" class="Wdate edline" onclick="WdatePicker({dateFmt:'yyyy/MM/dd'})"
                                                    runat="server"></asp:TextBox>
                                                对已报数成交报告编号：<asp:TextBox ID="txtReport_Change_ReportNO" class="edline" runat="server"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2"  Display="None" ControlToValidate="txtReport_Change_Reason" runat="server" ErrorMessage="原因不能为空"></asp:RequiredFieldValidator>
                                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator3"  Display="None" ControlToValidate="txtReport_Change_ReviseDate" runat="server" ErrorMessage="修改日期不能为空"></asp:RequiredFieldValidator>
                                               <asp:RequiredFieldValidator ID="RequiredFieldValidator4"  Display="None" ControlToValidate="txtReport_Change_ReportNO" runat="server" ErrorMessage="成交报告编号不能为空"></asp:RequiredFieldValidator>
                                               物业地址：<asp:TextBox ID="txtReport_Change_Address" Style="width: 300px;" class="edline"
                                                    runat="server"></asp:TextBox>
                                                  <asp:RequiredFieldValidator ID="RequiredFieldValidator5"  Display="None" ControlToValidate="txtReport_Change_Address" runat="server" ErrorMessage="物业地址不能为空"></asp:RequiredFieldValidator>
                                        
                                                现作以下调整：
                                             </p>
             
                                            <p>
                                                1.原成交物业地址改为：<asp:TextBox ID="txtReport_Change_ReviseAddress" Style="width: 350px;"
                                                    class="edline" runat="server"></asp:TextBox>
                                                     <asp:RequiredFieldValidator ID="RequiredFieldValidator6"  Display="None" ControlToValidate="txtReport_Change_ReviseAddress" runat="server" ErrorMessage="要修改的物业地址不能为空"></asp:RequiredFieldValidator>
                                        
                                            </p>
                                            <p>
                                                2.客户更名或增减名：原客户姓名<asp:TextBox ID="txtReport_Change_Client" class="edline" runat="server"></asp:TextBox>
                                                改为<asp:TextBox ID="txtReport_Change_ReviseClient" class="edline" runat="server"></asp:TextBox>
                                                  <asp:RequiredFieldValidator ID="RequiredFieldValidator7"  Display="None" ControlToValidate="txtReport_Change_Client" runat="server" ErrorMessage="原客户姓名不能为空"></asp:RequiredFieldValidator>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator8"  Display="None" ControlToValidate="txtReport_Change_ReviseClient" runat="server" ErrorMessage="修改后客户名称不能为空"></asp:RequiredFieldValidator>
                                           </p>
                                            <p>
                                                3.其它：<asp:TextBox ID="txtReport_Change_Other" Style="width: 470px;" class="edline"
                                                    runat="server"></asp:TextBox></p>
                                            <p>
                                                （注：上述项相应资料只需填写更改部份，不需更改部份可留空不填写）
                                            </p>
                                            <p>
                                              <table class="page" style="width: 100%;">
                                                <tr>
                                                    <td>
                                                        附件类型：
                                                    </td>
                                                    <td colspan="3" align="left">
                                                        <asp:DropDownList ID="ddlFileType" runat="server">
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="left" style="font-size: 15px;">
                                                        上传文件:
                                                    </td>
                                                    <td align="left" colspan="3">
                                                        <font face="宋体">
                                                            <input id="txtFilePath" runat="server" name="UploadFile" style="font-size: 9pt; width: 388px"
                                                                type="file" />
                                                        </font>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="left" style="font-size: 15px;">
                                                        其他资料:
                                                    </td>
                                                    <td align="left" colspan="3">
                                                        <font face="宋体">
                                                            <asp:TextBox ID="txtProjectDesc" runat="server" Width="384px"></asp:TextBox></font>
                                                        <asp:Button ID="btnUpLoad" Style="background-image: url(../images/pic15.gif); border-color: #ffffff;
                                                            background-repeat: no-repeat; padding-left: 17px;" runat="server" Visible="false"
                                                            Text="上传" OnClick="btnUpLoad_Click" />
                                                        <asp:HiddenField ID="HiddenField1" runat="server" />
                                                    </td>
                                                </tr>
                                            </table>
                                             <table id="tempTable" style="display: none; border-width: 0px; border-style: dotted;
                                                width: 600px; background-color: rgb(192, 255, 192);" border="0" rules="all" cellspacing="1"
                                                cellpadding="1">
                                                <tr style="background-color: rgb(216, 200, 168);" class="ttTable" align="center">
                                                    <td>
                                                        上传资料名称
                                                    </td>
                                                    <td style="width: 40px;">
                                                        删除
                                                    </td>
                                                </tr>
                                            </table>
                                                <asp:DataGrid ID="dgList" Visible="false" runat="server" AutoGenerateColumns="False"
                                                BackColor="#C0FFC0" BorderStyle="Dotted" BorderWidth="0px" CellPadding="1" CellSpacing="1"
                                                DataKeyField="Project_Report_ID" PageSize="20" Width="600px" OnItemCommand="dgList_ItemCommand"
                                                OnItemDataBound="dgList_ItemDataBound">
                                                <PagerStyle Mode="NumericPages" Position="TopAndBottom" />
                                                <AlternatingItemStyle BackColor="#F0F0E8" CssClass="td" />
                                                <ItemStyle BackColor="#F8F4E4" CssClass="td" />
                                                <HeaderStyle BackColor="#D8C8A8" CssClass="ttTable" HorizontalAlign="Center" />
                                                <Columns>
                                                    <asp:HyperLinkColumn DataNavigateUrlField="Project_Report_FilePath" DataTextField="Report_File_Name"
                                                        HeaderText="上传资料名称" Target="_blank"></asp:HyperLinkColumn>
                                                             <asp:TemplateColumn HeaderText="删除">
                                                        <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                            Font-Underline="False" HorizontalAlign="Center" Wrap="False" />
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="imgbtnDelete" runat="server" AlternateText="删除" BorderStyle="Dotted"
                                                                BorderWidth="0px" CommandName="Delete" ImageAlign="Middle" ImageUrl="..../images/delete.gif" />
                                                        </ItemTemplate>
                                                        <HeaderStyle Width="40px" />
                                                    </asp:TemplateColumn>
                                                </Columns>
                                            </asp:DataGrid>
                                                    <center>
                                                    <asp:Button ID="btnSave" runat="server" Text="保存" CausesValidation="false" OnClick="btnSave_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
                                                    <input id="btnReset" runat="server" type="reset" value="重置" />&nbsp;&nbsp;&nbsp;&nbsp;
                                                    <asp:Button  ID="btnDelete" runat="server" Text="删除" OnClick="btnDelete_Click" Visible="false" />&nbsp;&nbsp;&nbsp;&nbsp;
                                                    <asp:Button ID="btnAudit" runat="server" Text="营销[副]总监审核"   OnClientClick="if(confirm('是否确定审核通过？')){return true;}else{return false;}" onclick="btnAudit_Click" />
                                                    <asp:ValidationSummary ID="ValidationSummary1"  ShowMessageBox="true" ShowSummary="false" runat="server" />
                                                    </center>
                                            </p>
                                        </td>
                                    </tr>
                                </table>
                            </center>
                           
                        </td>
                    </tr>
        </tr>
        <tr>
            <td height="40" colspan="4">
                <table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
                    <tr>
                        <td>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td width="2%">
                &nbsp;
            </td>
            <td width="51%" class="left_txt">
                <img src="../images/icon-mail2.gif" width="16" height="11">
                客户服务邮箱：servers@centaline.com<br>
                <img src="../images/icon-phone.gif" width="17" height="14">
                官方网站：http://www.centaline.com.cn/
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
    </table>
    </td>
    <td background="../images/mail_rightbg.gif">
        &nbsp;
    </td>
    </tr>
    <tr>
        <td valign="bottom" background="../images/mail_leftbg.gif">
            <img src="../images/buttom_left2.gif" width="17" height="17" />
        </td>
        <td background="../images/buttom_bgs.gif">
            <img src="../images/buttom_bgs.gif" width="17" height="17">
        </td>
        <td valign="bottom" background="../images/mail_rightbg.gif">
            <img src="../images/buttom_right2.gif" width="16" height="17" />
        </td>
    </tr>
    </table>
     </form>
</body>
</html>
